﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="liberty-form.aspx.cs" Inherits="travel_forms_liberty_form"
    MasterPageFile="~/travel/MobileTravel.master" Async="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/controls/usrIdNumber.ascx" TagName="usrIdNumber" TagPrefix="uc1" %>
<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrNationality.ascx" TagName="usrNationality" TagPrefix="uc7" %>
<%@ Register Src="~/controls/usrGender.ascx" TagName="usrGender" TagPrefix="uc8" %>
<%@ Register Src="~/controls/usrPhoneNo.ascx" TagName="usrPhoneNo" TagPrefix="uc10" %>
<%@ Register Src="~/controls/usrOccupation.ascx" TagName="usrOccupation" TagPrefix="uc11" %>
<%@ Register Src="~/controls/usrMaritalStatus.ascx" TagName="usrMaritalStatus" TagPrefix="uc12" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <form id="form1" runat="server">
    <section>
<header id="header">
<nav id="nav">
<a href="../../Default.aspx"><div class="branding"></div></a>
<div class="navpages">
<a href="../travel-result.aspx">
<asp:Image ID="imgTop" runat="server" ImageUrl="~/images/button/topnav-back.png"  width="49" height="29" border="0" alt="back" BorderWidth="0"  /></a>
</div>
</nav>
</header>
</section>
    <section id="body">
<div class="body">
<div class="form">
<div class="top"></div>
<div class="body">
<div class="pad">
<h1>Insured Details</h1>
<div id="divInsured1">
<asp:TextBox ID="txtFullname" runat="server" Text="Your Name" CssClass="input"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvFullname" runat="server" ControlToValidate="txtFullname" CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
<uc8:usrGender ID="usrGender" ValidationGroup="travel_insurance" runat="server" IsEnabled="true" />
<uc12:usrMaritalStatus ID="ddlMaritalStatus" runat="server" IsEnabled="true" ValidationGroup="travel_insurance" ErrorMessage="" />
<uc7:usrNationality ID="ddlNationality" runat="server" ErrorMessage="" ValidationGroup="travel_insurance" />
<uc11:usrOccupation ID="usrOccupation" ValidationGroup="travel_insurance" runat="server" IsEnabled="true" />
 <span style="font-size:x-small;">Address</span><br />
 <span style="font-size:x-small;">unit</span>
<asp:TextBox ID="txtUnit1" MaxLength="10" runat="server" size="8" class="input" Width="60"></asp:TextBox>-<asp:RequiredFieldValidator ID="rfvUnit1" runat="server" CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance" ControlToValidate="txtUnit1"></asp:RequiredFieldValidator>
<asp:TextBox ID="txtUnit2" MaxLength="10" runat="server" size="8" class="input" Width="60"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvUnit2" runat="server" CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance" ControlToValidate="txtUnit2"></asp:RequiredFieldValidator>
<asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" MaxLength="120" Width="230px" class="input" Text="address.." ></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvAddress" runat="server" CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance" ControlToValidate="txtAddress" InitialValue="address.."></asp:RequiredFieldValidator>

<span style="font-size:x-small;">post code</span>
<asp:TextBox ID="txtPostCode" size="8" onkeypress="restrictToNumbers(event)" runat="server" MaxLength="6" Width="120px" class="input" ></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvPCode" runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage="" ValidationGroup="PostCode" ControlToValidate="txtPostCode"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revPCode" runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage="" ValidationGroup="PostCode" ValidationExpression="[0-9]{6}" ControlToValidate="txtPostCode"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="rfvPostCode" runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage="" ValidationGroup="travel_insurance" ControlToValidate="txtPostCode"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revPostCode" runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{6}" ControlToValidate="txtPostCode"></asp:RegularExpressionValidator>
</div>
<div id="divInsured2"> 
</div>
<hr />
<div id="divPayment">
<span style="font-size:x-small;">Payment Mode <br />*(Only VISA or Master Credit Card is acceptable for premium payment)</span>
<asp:TextBox ID="txtNameoftheCard" MaxLength="50" runat="server" size="25" Width="233" Text="Cardholder's Name" CssClass="input"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvNameoftheCard" ControlToValidate="txtNameoftheCard" ErrorMessage="" ValidationGroup="travel_insurance" CssClass="validationErrorControl" runat="server" InitialValue="Cardholder's Name"></asp:RequiredFieldValidator>
<asp:TextBox ID="txtIssuingBank" MaxLength="50" runat="server" size="25" Width="233" Text="Issuing Bank" CssClass="input"></asp:TextBox>
 <asp:RequiredFieldValidator ID="rfvIssuingBank" ControlToValidate="txtIssuingBank" ErrorMessage="" ValidationGroup="travel_insurance" CssClass="validationErrorControl" runat="server"></asp:RequiredFieldValidator>
 <span style="font-size:x-small;">Credit Card Number</span><br />
<asp:TextBox ID="txtCardNo1" runat="server" MaxLength="4" size="8" CssClass="input" Width="35px" ></asp:TextBox>
<asp:TextBox ID="txtCardNo2" runat="server" MaxLength="4" size="8" CssClass="input" Width="35px"></asp:TextBox>
<asp:TextBox ID="txtCardNo3" runat="server" MaxLength="4" size="8" CssClass="input" Width="35px"></asp:TextBox>
<asp:TextBox ID="txtCardNo4" runat="server" MaxLength="4" size="8" CssClass="input" Width="35px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvCardNo1" ControlToValidate="txtCardNo1" ErrorMessage="" ValidationGroup="travel_insurance" CssClass="validationErrorControl"
runat="server"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revCardNo1" runat="server" CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{4}"
ControlToValidate="txtCardNo1"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="rfvCardNo2" ControlToValidate="txtCardNo2" ErrorMessage="" ValidationGroup="travel_insurance" CssClass="validationErrorControl"
runat="server"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revCardNo2" runat="server" CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{4}"
ControlToValidate="txtCardNo2"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="rfvCardNo3" ControlToValidate="txtCardNo3" ErrorMessage="" ValidationGroup="travel_insurance" CssClass="validationErrorControl"
runat="server"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revCardNo3" runat="server" CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{4}"
ControlToValidate="txtCardNo3"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="rfvCardNo4" ControlToValidate="txtCardNo4" ErrorMessage="" ValidationGroup="travel_insurance" CssClass="validationErrorControl"
runat="server"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revCardNo4" runat="server" CssClass="validationErrorControl"
ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{4}"
ControlToValidate="txtCardNo4"></asp:RegularExpressionValidator>
<asp:CustomValidator CssClass="validationErrorControl" ControlToValidate="txtCreditCardValid"
ValidationGroup="travel_insurance" ID="csvCreditCardValid" runat="server" ErrorMessage="Credit Card number not valid."
Text="" OnServerValidate="csvCreditCardValid_ServerValidate"></asp:CustomValidator>
<span style="display: none">
<asp:TextBox ID="txtCreditCardValid" Text="Valid" runat="server"></asp:TextBox>
</span><br />
 <span style="font-size:x-small;">Expiry Date:</span>
<asp:DropDownList ID="ddlCardExpiryMonth" runat="server" CssClass="input" Width="50">
<asp:ListItem Selected="True" Value="-1">mm</asp:ListItem>
<asp:ListItem Value="01">01</asp:ListItem>
<asp:ListItem Value="02">02</asp:ListItem>
<asp:ListItem Value="03">03</asp:ListItem>
<asp:ListItem Value="04">04</asp:ListItem>
<asp:ListItem Value="05">05</asp:ListItem>
<asp:ListItem Value="06">06</asp:ListItem>
<asp:ListItem Value="07">07</asp:ListItem>
<asp:ListItem Value="08">08</asp:ListItem>
<asp:ListItem Value="09">09</asp:ListItem>
<asp:ListItem Value="10">10</asp:ListItem>
<asp:ListItem Value="11">11</asp:ListItem>
<asp:ListItem Value="12">12</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="ddlCardExpiryYear" runat="server" CssClass="input" Width="80">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="rfvCardExpiryMonth" ControlToValidate="ddlCardExpiryMonth" ErrorMessage="" ValidationGroup="travel_insurance" InitialValue="-1" Text=""
CssClass="validationErrorControl" runat="server"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfvCardExpiryYear" ControlToValidate="ddlCardExpiryYear" ErrorMessage="" ValidationGroup="travel_insurance" InitialValue="-1" Text=""
CssClass="validationErrorControl" runat="server"></asp:RequiredFieldValidator>
<asp:CustomValidator CssClass="validationErrorControl" ControlToValidate="txtCCExpiredValid" ValidationGroup="travel_insurance" ID="csvCCExpiredValid" runat="server" ErrorMessage="Credit Card expire not valid."
Text="" OnServerValidate="csvCCExpiredValid_ServerValidate"></asp:CustomValidator>
<span style="display: none">
<asp:TextBox ID="txtCCExpiredValid" Text="Valid" runat="server"></asp:TextBox>
</span><br />

<span id="divVisa">
<asp:RadioButton onclick="ValCheckCardType();CheckCardTypeValidationCss();" ID="rdoVisa" runat="server" GroupName="cardtype" />
&nbsp;<asp:Label class="pad_10xr" ID="lblVisa" runat="server" Text="VISA" Font-Size="X-Small" ></asp:Label>
</span><span id="divMasterCard">
<asp:RadioButton onclick="ValCheckCardType();CheckCardTypeValidationCss();" ID="rdoMasterCard" runat="server" GroupName="cardtype" />
&nbsp;<asp:Label ID="lblMasterCard" runat="server" Text="MasterCard" Font-Size="X-Small"></asp:Label>
</span>
<div style="display: none">
<asp:TextBox ID="txtCardType" runat="server"></asp:TextBox>
</div>
<asp:RequiredFieldValidator ID="rfvCardType" runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage="" ControlToValidate="txtCardType" ValidationGroup="travel_insurance"
Text=""></asp:RequiredFieldValidator>
<br />
<hr /><br />
<asp:ImageButton ID="imgbtnSubmit" runat="server" ImageUrl="~/images/button/submit_single.png" ValidationGroup="travel_insurance" />
</div>
</div>
</div>
</div>
<div class="bottom"></div>
</div>
</section>
    </form>

    <script type="text/javascript">
        function restrictToNumbers(e) {
            if ([e.keyCode || e.which] == 8 || [e.keyCode || e.which] == 37 || [e.keyCode || e.which] == 9 || [e.keyCode || e.which] == 39) //this is to allow backspace
                return true;

            if ([e.keyCode || e.which] < 48 || [e.keyCode || e.which] > 57)
                e.preventDefault ? e.preventDefault() : e.returnValue = false;
        }
    </script>

</asp:Content>
